/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.goods.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.jeesite.common.entity.Page;
import com.jeesite.common.service.CrudService;
import com.jeesite.modules.file.utils.FileUploadUtils;
import com.jeesite.modules.goods.dao.ZtTrolleyDao;
import com.jeesite.modules.goods.entity.ZtGoods;
import com.jeesite.modules.goods.entity.ZtTrolley;

/**
 * 测试数据Service
 * 
 * @author ThinkGem
 * @version 2018-04-22
 */
@Service
@Transactional(readOnly = true)
public class ZtTrolleyService extends CrudService<ZtTrolleyDao, ZtTrolley> {
	

	/**
	 * 获取单条数据
	 * 
	 * @param testData
	 * @return
	 */
	@Override
	public ZtTrolley get(ZtTrolley ztTrolley) {
		ZtTrolley entity = super.get(ztTrolley);
		if (entity == null) {
			entity = new ZtTrolley();
		}
		return entity;
	}
	public List<ZtTrolley> findMh(ZtTrolley ztTrolley){
		return dao.findMh(ztTrolley);
	}
	
	public ZtTrolley getByGoods(ZtTrolley ztTrolley){
		return dao.getByGoods(ztTrolley);
	}
	public Integer getCount(ZtTrolley ztTrolley){
		return dao.getCount(ztTrolley);
	}
	
	
	

	/**
	 * 查询分页数据
	 * 
	 * @param page
	 *            分页对象
	 * @param testData
	 * @return
	 */
	@Override
	public Page<ZtTrolley> findPage(Page<ZtTrolley> page, ZtTrolley ztTrolley) {
		return super.findPage(page, ztTrolley);
	}

	/**
	 * 保存数据（插入或更新）
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void save(ZtTrolley ztTrolley) {
		super.save(ztTrolley);
		
	}

	/**
	 * 更新状态
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void updateStatus(ZtTrolley ztTrolley) {
		super.updateStatus(ztTrolley);
	}


	/**
	 * 删除数据
	 * 
	 * @param testData
	 */
	@Override
	@Transactional(readOnly = false)
	public void delete(ZtTrolley ztTrolley) {
		super.delete(ztTrolley);
	}

}